package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CdTipoNota generated by hbm2java
 */
@Entity
@Table(name = "CD_TIPO_NOTA", schema = "CTROLDOC")
public class CdTipoNota implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5575367310151584801L;
	private String cnota;
	private String dnota;
	private String cusuario;
	private Date fhingreso;
	private Set<CdNotas> cdNotases = new HashSet<CdNotas>(0);

	public CdTipoNota() {
	}

	public CdTipoNota(String cnota, String dnota, String cusuario,
			Date fhingreso) {
		this.cnota = cnota;
		this.dnota = dnota;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	public CdTipoNota(String cnota, String dnota, String cusuario,
			Date fhingreso, Set<CdNotas> cdNotases) {
		this.cnota = cnota;
		this.dnota = dnota;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.cdNotases = cdNotases;
	}

	@Id
	@Column(name = "C_NOTA", unique = true, nullable = false, length = 2)
	public String getCnota() {
		return this.cnota;
	}

	public void setCnota(String cnota) {
		this.cnota = cnota;
	}

	@Column(name = "D_NOTA", nullable = false, length = 60)
	public String getDnota() {
		return this.dnota;
	}

	public void setDnota(String dnota) {
		this.dnota = dnota;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cdTipoNota")
	public Set<CdNotas> getCdNotases() {
		return this.cdNotases;
	}

	public void setCdNotases(Set<CdNotas> cdNotases) {
		this.cdNotases = cdNotases;
	}

}
